﻿/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2012-2018. All rights reserved.
 * Description:
 * Author: 辛爱国 x30005137
 * Create: 2020-07-28
 * Notes: 无
 */
#include "certupdatedialog.h"
#include <QGraphicsDropShadowEffect>
#include <qapplication.h>
#include <QDesktopWidget>
#include <qscreen.h>


void CertUpdateDialog::on_pushButtonExit_clicked()
{
    hide();
}

void CertUpdateDialog::on_pushButtonOK_clicked()
{
//    ideasharesdk::terminal::downloadCert();
//    ideasharesdk::terminal::reconnect();
    hide();
}
void CertUpdateDialog::on_pushButtonCancel_clicked()
{
    hide();
}

CertUpdateDialog::CertUpdateDialog(QWidget *parent) : HWDialog(parent)
{
    setupUi(this);
    setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::WindowStaysOnTopHint);
    this->setAttribute(Qt::WA_TranslucentBackground);
    QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this);
    shadow_effect->setOffset(0, 0);
    shadow_effect->setColor(Qt::gray);
    shadow_effect->setBlurRadius(10); // 阴影设置半径10
    this->widgetWindow->setGraphicsEffect(shadow_effect);
    saveChildrenInfo();
}

CertUpdateDialog::~CertUpdateDialog() {}
